//
//  MyProvinceModel.m
//  QuickCure
//
//  Created by 魏根 on 16/9/12.
//  Copyright © 2016年 haoge. All rights reserved.
//

#import "MyProvinceModel.h"

@implementation MyProvinceModel

+(instancetype)provinceWithDict:(NSDictionary *)dict{
    
    MyProvinceModel *tempModel = [[MyProvinceModel alloc]init];
    
    [tempModel setValuesForKeysWithDictionary:dict];
    
    return tempModel;
}

- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    
}

+ (NSArray <MyProvinceModel *>*)provinceData{
    
    NSArray *array = [NSArray arrayWithContentsOfFile:[[NSBundle mainBundle]pathForResource:@"province.plist" ofType:nil]];
                      
    NSMutableArray *nmArray = [NSMutableArray arrayWithCapacity:array.count];
    
    [array enumerateObjectsUsingBlock:^(NSDictionary *  _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
       
       [nmArray addObject:[MyProvinceModel provinceWithDict:obj]];
        
    }];
    
    return nmArray.copy;
    
}

- (NSString *)description{
    
    return [NSString stringWithFormat:@"%@{citis = %@ ,name = %@}",[super description],self.cities,self.name];
}



@end
